package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "t_role", schema = "ssh_pro", catalog = "")
public class TRoleEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int rid;
    private String name;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TRoleEntity that = (TRoleEntity) o;
        return rid == that.rid && Objects.equals(name, that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, name);
    }
}
